package com.itheima.activiti.dao;


import com.itheima.activiti.domain.ActRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ActRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ActRole record);

    int insertSelective(ActRole record);

    ActRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ActRole record);

    int updateByPrimaryKey(ActRole record);

    @Select("select ar.name from act_role ar left join act_user_role aur  on aur.role_id= ar.id where aur.user_id=#{userId} ")
    List<String> selectByUserId(Integer userId);
}